//
//  rankLisitDetailsViewController.m
//  FastRunDemo
//
//  Created by 苟亚明 on 16/9/29.
//  Copyright © 2016年 苟亚明. All rights reserved.
//

#import "rankLisitDetailsViewController.h"
#import "rankListDetailHeaderView.h"
#import "rankDetailCell.h"
#import "CALayer+XC.h"
@interface rankLisitDetailsViewController () <UITableViewDelegate, UITableViewDataSource>
@property (nonatomic, strong) UITableView *tableView;

@end

@implementation rankLisitDetailsViewController
static NSString *const rankCellId = @"rankCellId";
- (void)viewDidLoad {
    [super viewDidLoad];
    rankListDetailHeaderView *header = [rankListDetailHeaderView viewFromNib];
    header.frame= CGRectMake(0, 0, GYMScreenW, 190);
    
    CALayer *shortLine = [CALayer shortLineLayer];
    shortLine.frame = CGRectMake(0, header.height - 0.5, GYMScreenW, 0.5);
    [header.layer addSublayer:shortLine];
    [self.view addSubview:header];
    
    // 初始化tableView
    self.tableView = [[UITableView alloc]initWithFrame:CGRectMake(0, header.height, GYMScreenW, self.view.height - header.height)];
    // 注册
    [self.tableView registerNib:[UINib nibWithNibName:@"rankDetailCell" bundle:nil] forCellReuseIdentifier:rankCellId];
    self.tableView.dataSource = self;
    self.tableView.delegate = self;
    self.tableView.rowHeight = 60;
    self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
    [self.view addSubview:self.tableView];
    
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
    return 10;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    
    rankDetailCell *cell = [tableView dequeueReusableCellWithIdentifier:rankCellId];
    
    return cell;
}

@end
